<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .content{
            font-size: 20px;
            text-indent: 20px;
        }
    </style>
</head>
<body>
    <h1 class="title"></h1>
    <div class="content"></div>
    <script>
        const urlParams = new URLSearchParams(window.location.search)
        const id = urlParams.get('id')
        const data = JSON.parse(localStorage.getItem("list"))
        let title = document.querySelector('.title')
        let content = document.querySelector('.content')
        let targetArticle
        data.forEach(element => {
            if(element.id === id){
                targetArticle = element
            }
        });
        title.innerHTML = targetArticle.title
        content.innerHTML = targetArticle.content
    </script>
</body>
</html>